using System;
using System.Collections.Generic;
using System.Text;
using System.CodeDom.Compiler;
using System.ComponentModel;

namespace Clarius.PresentationModel.Design.Tests
{
	public partial class My<T> : ISupportInitialize, IChangeTracking
	{
		int _value;

		public int Value
		{
			get { return _value; }
			set { this.RaiseValueChanging(); _value = value; this.RaiseValueChanged(); }
		}

		// TODO: DataBinding - Implement instance validation here
		protected virtual void DoValidate()
		{

		}

		// TODO: DataBinding - Implement initialization here
		protected virtual void DoInitialize()
		{

		}
	}

	public partial class ChildNotifier
	{
		int _value;

		public int Value
		{
			get { return _value; }
			set { this.RaiseValueChanging(); _value = value; this.RaiseValueChanged(); }
		}
	}

	public partial class MockBase : ISupportInitialize, IChangeTracking
	{
		int _auto;
		public int InitializeCalls;

		public void Ensure()
		{
		}

		private int baseIntValue;

		public int BaseIntValue
		{
			get { return baseIntValue; }
			set
			{
				this.RaiseBaseIntValueChanging();
				baseIntValue = value;
				this.RaiseCalculatedPropertyChanged();
				this.RaiseBaseIntValueChanged();
			}
		}

		public int Auto
		{
			get { return _auto; }
			set
			{
				this.RaiseAutoChanging(); 
				_auto = value;
				this.RaiseCalculatedPropertyChanged();
				this.RaiseAutoChanged();
			}
		}

		private object baseObject;

		public object BaseObject
		{
			get { return baseObject; }
			set { this.RaiseBaseObjectChanging(); baseObject = value; this.RaiseBaseObjectChanged(); }
		}

		public int CalculatedProperty
		{
			get { return BaseIntValue + Auto; }
		}

		// TODO: Implement initialization here
		protected virtual void DoInitialize()
		{

		}
	}

	public partial class MockDerived : MockBase
	{
		private int derivedIntValue;

		public int DerivedIntValue
		{
			get { return derivedIntValue; }
			set { this.RaiseDerivedIntValueChanging(); derivedIntValue = value; this.RaiseDerivedIntValueChanged(); }
		}

		private object derivedObject;

		public object DerivedObject
		{
			get { return derivedObject; }
			set { this.RaiseDerivedObjectChanging(); this.derivedObject = value; this.RaiseDerivedObjectChanged(); }
		}

		private MockBase mock;

		public MockBase Mock
		{
			get { return mock; }
			set { this.RaiseMockChanging(); mock = value; this.RaiseMockChanged(); }
		}

		public void DoSomething()
		{
		}

		// TODO: Implement initialization here
		protected override void DoInitialize()
		{
			base.DoInitialize();

		}
	}
}
